<template>
    <div>
      <!--   要求登录dialog-->
      <el-dialog
        title="提示"
        :visible.sync="dialog"
        width="30%">
        <span style="color: black">您需要登录，以此查看购物车！</span>
        <span slot="footer" class="dialog-footer">
    <el-button  @click="dialogVisible = false">取 消</el-button>
    <el-button style="background: rgb(255, 0, 54); color: white" @click="toLogin">去登录</el-button>
  </span>
      </el-dialog>
    </div>
</template>

<script>
export default {
  name: 'Dialog',
  data() {
    return {
    }
  },
  methods: {
    toLogin() {
      this.$router.push('shop_login')
    }
  },
  props: ['dialog']
}
</script>

<style scoped>

</style>
